package com.han.walkman.controller;

import com.han.walkman.entity.ProductionTypeEntity;
import com.han.walkman.service.ProductionTypeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Hanjiafeng
 * @Date: 2020/5/2
 * @Desc:
 */
@RestController
@RequestMapping("/productionType")
public class ProductionTypeController {
    private final ProductionTypeService productionTypeService;

    public ProductionTypeController(ProductionTypeService productionTypeService) {
        this.productionTypeService = productionTypeService;
    }

    @GetMapping("/findAll")
    public List<ProductionTypeEntity> findAll() {
        return productionTypeService.findAll();
    }
}
